<div class="well">
<?php if (isset($this->error)) : ?>
    <?php if ($this->error) : ?>
        <div class="alert alert-error alert-block">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <?php echo $this->mensaje ?>
        </div>
    <?php else : ?>
        <div class="alert alert-success alert-block">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <?php echo $this->mensaje ?>
        </div>
    <?php endif; ?>
<?php endif; ?>

<?php if (!$this->error) { ?>
    <div class="row">
        <?php $fecha = new DateTime(); ?>
        <br/>
        <div class="span8 well well-small" style="padding:0; background-color: silver;">
            <div class="span3">
                <h4>CREDYPHONE</h4>
                <strong>Sucursal: </strong> <?php echo $this->usuario->getSucursal()->getDescripcion() ?><br/>
                <strong>N&#176; Credito: </strong> <?php echo $this->credito->getNumero() ?><br/>
                <strong>Apellidos: </strong> <?php echo $this->credito->getCliente()->getApellido() ?><br/>
                <strong>Nombres: </strong> <?php echo $this->credito->getCliente()->getNombres() ?><br/>
                <strong>Otorgado: </strong> <?php echo $this->credito->getFecha()->format("d/m/Y") ?><br/>
                <strong>Cant. Cuota: </strong> <?php echo $this->credito->getNroCuotas() ?><br/>
                <strong>Importe Cuota: </strong> <?php echo $this->credito->getCuotas()->first()->getMonto() ?><br/>
                <strong>Importe Total: </strong> <?php echo $this->credito->getMonto() ?><br/>
            </div>
            <div class="span3">
                <h4>CREDYPHONE</h4>
                <strong>Sucursal: </strong> <?php echo $this->usuario->getSucursal()->getDescripcion() ?><br/>
                <strong>N&#176; Credito: </strong> <?php echo $this->credito->getNumero() ?><br/>
                <strong>Apellidos: </strong> <?php echo $this->credito->getCliente()->getApellido() ?><br/>
                <strong>Nombres: </strong> <?php echo $this->credito->getCliente()->getNombres() ?><br/>
                <strong>Otorgado: </strong> <?php echo $this->credito->getFecha()->format("d/m/Y") ?><br/>
                <strong>Cant. Cuota: </strong> <?php echo $this->credito->getNroCuotas() ?><br/>
                <strong>Importe Cuota: </strong> <?php echo $this->credito->getCuotas()->first()->getMonto() ?><br/>
                <strong>Pr&oacute;ximo Vencimiento: </strong> <?php echo $this->credito->obtenerProximoVencimiento()->format("d/m/Y") ?><br/><br/><br/>
            </div>
        </div><br/><br/>
    </div>
 
    <a href="<?php echo $this->baseUrl()."/negocio/creditos/listado/cliente_id/".$this->credito->getCliente()->getId(); ?>" type="button" class="btn btn-inverse">Continuar</a> 
    <a href="#" onclick="imprimir('<?php echo $this->baseUrl()."/usuarios/credito/impresionotorgacion/lpt1/1/credito_id/".$this->credito->getId(); ?>')" class="btn btn-inverse">Imprimir Recibo</a>
<?php } ?>
</div>
<script type="text/javascript">
    function imprimir(url) {
        mywindow = window.open(url, "impresion", "location=1,status=1,scrollbars=1,  width=300,height=300");
        mywindow.moveTo(100,100);
    }    
</script>
